using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CreateSteringEngine_Up : MonoBehaviour
{
    public GameObject steringEngin_Up_Prefab;

    public GameObject  m_Camera;

    private Vector3 createPosition;
    
    private bool isHit_CSE = false;

    private void CreateStart()
    {
        createPosition = m_Camera.GetComponent<MousRay>().hitPosition;
        //createPosition = new Vector3(0, 0, 0);
        Quaternion createRotation = new Quaternion(0, 0, 0, 0);

        GameObject SteringEngine_Up = GameObject.Instantiate(steringEngin_Up_Prefab, createPosition, createRotation) as GameObject;

       // Debug.Log(createPosition);

    }

    private void Update()
    {
        isHit_CSE = m_Camera.gameObject.GetComponent<MousRay>().isHit;
        if(isHit_CSE && Input.GetMouseButtonDown(0))
        {
            CreateStart();
        }
    }
}
